﻿[assembly:
        System.Web.UI.WebResource("BM.Tools.WebControls.MForm.Controls.ValueHandlers.ListControlValueHandler.js",
                "application/x-javascript")]
[assembly:
        System.Web.UI.WebResource("BM.Tools.WebControls.MForm.Controls.ValueHandlers.ListControlValueHandler.debug.js",
                "application/x-javascript")]

namespace BM.Tools.WebControls.MForm.Controls.ValueHandlers
{
    using System.Web.UI;
    using System.Web.UI.WebControls;

    using AjaxControlToolkit;

    using BM.Tools.WebControls.MForm.Controls.Items;

    /// <summary>
    /// A control that binds the <see cref="LeafItem" /> control with a <see cref="DropDownList" /> control.
    /// </summary>
    [ClientScriptResource("BM.Tools.WebControls.MForm",
            "BM.Tools.WebControls.MForm.Controls.ValueHandlers.ListControlValueHandler.js")]
    public class DropDownListValueHandler : ListControlValueHandler<DropDownList>
    {
        /// <summary>
        /// Gets or sets DropDownList.
        /// </summary>
        /// <value>
        /// The drop down list.
        /// </value>
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public DropDownList DropDownList
        {
            get
            {
                return Control;
            }

            set
            {
                Control = value;
            }
        }
    }
}